package com.woniu.sharepark.leasesystem.common.controller;


import com.woniu.sharepark.common.JsonResult;
import com.woniu.sharepark.leasesystem.common.service.IndentFormService;
import com.woniu.sharepark.util.GetLoginUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author DELL
 * @date 2019/6/20 10:07
 * version v1.0
 */
@RequestMapping("/indentForm")
@Controller
public class IndentFormController {

    @Autowired
    private IndentFormService indentFormService;

    @RequestMapping("/findIndentForm")
    @ResponseBody
    public ModelAndView findIndentForm(ModelAndView modelAndView){
        JsonResult jsonResult = indentFormService.findIndentForm(GetLoginUtil.getLogin().getUserInfo().getuId());
        modelAndView.addObject("result",jsonResult);
        modelAndView.setViewName("mobile/address");
        return modelAndView;
    }
}
